package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;

@TableName("t_facilities")
public class FacilitiesBean {
    //设施id
    @TableId(value = "pk_facId" , type = IdType.AUTO)
    private Integer id;
    //损坏描述
    @TableField("f_describe")
    private String describe;
    //房间对象
    @TableField(exist = false)
    private RoomBean roomBean;
    //报损日期
    @TableField("f_date")
    private LocalDate time=LocalDate.now();
    //是否解决问题
    @TableField("f_status")
    private String status="未解决";

    @TableField("fk_roomId")
    private Integer roomId;

    public FacilitiesBean() {
    }

    public FacilitiesBean(String describe, Integer roomId, String status) {
        this.describe = describe;
        this.roomBean = new RoomBean();
        roomBean.setId(roomId);
        this.status = status;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public RoomBean getRoomBean() {
        return roomBean;
    }

    public void setRoomBean(RoomBean roomBean) {
        this.roomBean = roomBean;
    }

    public LocalDate getTime() {
        return time;
    }

    public void setTime(LocalDate time) {
        this.time = time;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getRoomId() {
        return roomId;
    }

    public void setRoomId(Integer roomId) {
        this.roomId = roomId;
    }

    @Override
    public String toString() {
        return "FacilitiesBean{" +
                "id=" + id +
                ", describe='" + describe + '\'' +
                ", roomBean=" + roomBean +
                ", time=" + time +
                ", status='" + status + '\'' +
                ", roomId=" + roomId +
                '}'+"\n";
    }
}
